import Vue from 'vue'
import Router from 'vue-router'
/* Layout */
import login from '@/portal-common/commonPage/login/index'
import home from '@/views/home/index'
import home2 from '@/views/home2/index'
// import test from '@/router/test';

Vue.use(Router)
export default new Router({
  mode: 'history', // require service support
  scrollBehavior: () => ({
    y: 0
  }),
  routes: [
    {
      path: '/loginDev',
      component: login,
      name: 'loginDev'
    },
    {
      path: '/',
      component: home,
      name: 'home'
    },
    {
      path: '/home2',
      component: home2,
      name: 'home2'
    }
  ]
})
// let asyncRouterMap = [
//   ...test,
//   {
//     path: '*', // 页面不存在的情况下会跳到404页面
//     redirect: '/404',
//     name: 'notFound',
//     hidden: true,
//     meta: {
//       title: '404',
//       permissionValue: '*'
//     }
//   }
// ];

// export { asyncRouterMap, constantRouterMap };
// import Vue from "vue";
// import VueRouter from "vue-router";
// import Form from "@/views/formGen.vue";

// Vue.use(VueRouter);

// const routes = [
//   {
//     path: "/",
//     name: "Form",
//     component: Form,
//   },
// ];

// const router = new VueRouter({
//   routes,
// });

// export default router
